home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / ams__l~1.zoo / include / timer.h < prev   
Encoding:
C/C++ Source or Header  |  1993-09-05  |  881 b   |  36 lines

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. //  This file is part of the Atari Machine Specific Library,
  4. //  and is Copyright 1992 by Warwick W. Allison.
  5. //
  6. //  You are free to copy and modify these sources, provided you acknowledge
  7. //  the origin by retaining this notice, and adhere to the conditions
  8. //  described in the file COPYING.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. #ifndef _Timer_h
  12. #define _Timer_h
  13.  
  14. unsigned long Hz200();
  15. void Delay(unsigned long msec);
  16.  
  17. class TimerSpeed
  18. {
  19. public:
  20.     TimerSpeed(int Hz); // Ask for given speed
  21.     operator int(); // closest approximation
  22.  
  23. private:
  24.     int Control,Data;
  25.     friend void SetTimerA(void ISR(), TimerSpeed&); // Should be member?
  26. };
  27.  
  28. void HaltTimerA();
  29.  
  30. void SetTimerA(void ISR(), TimerSpeed&);
  31.  
  32. void SetTimerA(void ISR(), int Hz); // Slow.
  33.  
  34.  
  35. #endif
  36.